{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from mlrun.serving import Model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "class MyRemoteModel(Model):\n",
    "    def predict(self, body, **kwargs):\n",
    "        body[\"url\"] = self.model_artifact.model_url\n",
    "        body[\"default_config\"] = self.model_artifact.default_config\n",
    "        return body\n",
    "\n",
    "    async def predict_async(self, body, **kwargs):\n",
    "        body[\"async_triggered\"] = \"Async predict was triggered.\"\n",
    "        return body"
   ],
   "metadata": {
    "collapsed": false
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
